mod t3301_generic_func;
mod t3302_generic_struct;
mod t3303_generic_enum;
mod t3304_generic_method;
mod t3305_generic_trait;
mod t3306_generic_lifetime;

pub fn add<T: std::ops::Add<Output = T>>(a: T, b: T) -> T {
    a + b
}

fn main() {
    // let count1 = add(5, 6);
    // let count2 = add(5.5, 6.6);
    // println!("{}", count1);
    // println!("{}", count2);
    //
    // let number_list = vec![34, 50, 25, 100, 65];
    // let result = largest(&number_list);
    // println!("The largest number is {}", result);
    //
    // let char_list = vec!['y', 'm', 'a', 'q'];
    // let result = largest(&char_list);
    // println!("The largest char is {}", result);
}

// fn largest<T: std::cmp::PartialOrd>(list: &[T]) -> &T {
//     let mut largest = &list[0];
//     for item in list.iter() {
//         if item > largest {
//             largest = item;
//         }
//     }
//
//     largest
// }